home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14365 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  874 b 

  1. Path: news-m01.ny.us.ibm.net!usenet
  2. From: bfilone@ibm.net  <Bruce Filone>
  3. Newsgroups: comp.lang.c
  4. Subject: Check if a file exists?
  5. Date: 13 Apr 1996 21:53:52 GMT
  6. Organization: J.W. Pepper, Pa
  7. Message-ID: <4kp7pg$upe@news-s01.ny.us.ibm.net>
  8. Reply-To: bfilone@ibm.net
  9. NNTP-Posting-Host: slip129-37-250-67.pa.us.ibm.net
  10. X-Newsreader: IBM NewsReader/2 v1.03
  11.  
  12. Is it possible in C to check if a file exists other than checking for a succesful 
  13. fopen? ON a unix machine, I just want to know if a file is there or not, do not
  14. to read or write anything to it. similar to the -f test in unix? I was hoping for
  15. something less costly than opening and closing if exists because I am checking
  16. for the existance of many files during the run of a process 
  17. Did not see any postings that seemed to refer to this.
  18. Thanks in advance. 
  19. Bruce
  20.  
  21.  
  22. Bruce Filone 
  23. J. W. Pepper & Son
  24. bfilone@ibm.net 
  25.  
  26.